#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<stdlib.h>

float samakarn(float x)
{
 float samakarn1;
 samakarn1 = pow(x,5)+pow(x,3)+pow(x,2)-1;
 return samakarn1;
}

float eabs(float aa)
{
 if()

}



main(){
       float fx1,fa1,fax1;
       int  i;
       float x1;
       float a1=0,b1=1,fa,fb;
       float set[2];
       float xx;
       float caller,caller1;
     
       fa = samakarn(a1);
       fb = samakarn(b1);
           if((fa>0&&fb<0)||(fa<0&&fb>0))
           {
               
                 x1 =(a1+b1)/2;
                 fa1 = samakarn(a1);
                 fx1 = samakarn(x1);
                 fax1 = fa1*fx1;
                 printf("%.3f",fax1);
                      if(fax1>0){
                         set[0]=x1;
                         set[1]=b1;
                     }
                      if(fax1<0){
                         set[0]=a1;
                         set[1]=x1;
                      }   
         
            }
         
         printf("\n%.3f\n",fax1);
         

         if(caller<=0.1)
         {  
           for(i=0;eabs<=0.1;i++)
           {
         
          xx = (set[0]+set[1])/2;
          
          
          printf("\n%.3f",xx);
          caller = eabs(xx,x1);
          
      
              if(fax1>0){
                      set[0]=x1;
                      set[1]=b1;
               }
               if(fax1<0){
                      set[0]=a1;
                      set[1]=x1;
               }
               
               
         }
      
                
       getch();
       return 0;
}
       
